package cn.cailin.day07.demo12ReverseStream;

import java.io.*;

/*
    转换文件
 */
public class test {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr=new InputStreamReader(new FileInputStream("D:\\IDEA\\day05-code\\src\\cn\\cailin\\day07\\我是默认.txt"),"GBK");
        OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream("D:\\IDEA\\day05-code\\src\\cn\\cailin\\day07\\我是utf-8.txt"),"UTF-8");
        int len=0;
        while ((len= isr.read())!=-1){
            osw.write(len);
        }
        osw.close();
        isr.close();
    }
}
